import request from "@/utils/request";

// 登录
export function loginCheck(data) {
  return request({
    url: "/login/check",
    method: "post",
    data
  });
}

export function getInfo(token) {
  return request({
    url: "/vue-admin-template/user/info",
    method: "get",
    params: { token }
  });
}

// 登出
export function logout(data) {
  return request({
    url: "/login/out",
    method: "post",
    data
  });
}
// 注册用户
export function register(data) {
  return request({
    url: "/login/register",
    method: "post",
    data
  });
}

// 普通用户更新密码
export function upPwd(data) {
  return request({
    url: "/user/upPasswordByUser",
    method: "post",
    data
  });
}

// 管理员更新密码
export function managerUpPwd(data) {
  return request({
    url: "/user/upPasswordByAdmin",
    method: "post",
    data
  });
}

// 更新用户基础信息
export function upUserBasic(data) {
  return request({
    url: "/user/save",
    method: "post",
    data
  });
}

// 更新用户基础信息
export function getList(data) {
  return request({
    url: "/user/pageByStatus",
    method: "post",
    data
  });
}

// 禁用/启用指定用户帐号
export function upStatus(data) {
  return request({
    url: "/user/upStatus",
    method: "post",
    data
  });
}

